<?php
$this->pageTitle = Yii::app()->name . ' - ' . UserModule::t("Login");
?>
<div class="span6">
    <div class="box">
        <h4 class="notice-title"><?php echo UserModule::t("Đăng nhập"); ?></h4>

        <?php if (Yii::app()->user->hasFlash('loginMessage')): ?>

            <div class="success">
                <?php echo Yii::app()->user->getFlash('loginMessage'); ?>
            </div>

        <?php endif; ?>


        <div class="notice">
            <?php
            $form = $this->beginWidget('CActiveForm', array(
                'id' => 'login-form',
                'enableAjaxValidation' => FALSE,
                'htmlOptions' => array("class" => "form-horizontal well"),
            ));
            ?>
            <div class="control-group">
                <?php echo $form->labelEx($model, 'username', array('class' => 'control-label')); ?>
                <div class="controls">
                    <?php echo $form->textField($model, 'username', array('placeholder' => 'Email / Tài khoản', 'class' => 'span3')); ?>
                    <?php echo $form->error($model, 'username'); ?>
                </div>
            </div>
            <div class="control-group">
                <?php echo $form->labelEx($model, 'password', array('class' => 'control-label')); ?>
                <div class="controls">
                    <?php echo $form->passwordField($model, 'password', array('placeholder' => 'Mật khẩu', 'class' => 'span3')); ?>
                    <?php echo $form->error($model, 'password'); ?>
                </div>
            </div>

            <div class="control-group">        
                <div class="controls">    
                    <?php echo CHtml::submitButton(UserModule::t("Đăng nhập"), array('class' => 'btn btn-success submit')); ?>
                    <?php echo CHtml::link(UserModule::t("Quên mật khẩu?"), Yii::app()->getModule('user')->recoveryUrl, array('class' => 'forgot-password')); ?>
                </div>
            </div>
            <?php $this->endWidget(); ?>
        </div><!-- form -->


        <?php
        $form = new CForm(array(
            'elements' => array(
                'username' => array(
                    'type' => 'text',
                    'maxlength' => 32,
                ),
                'password' => array(
                    'type' => 'password',
                    'maxlength' => 32,
                ),
                'rememberMe' => array(
                    'type' => 'checkbox',
                )
            ),
            'buttons' => array(
                'login' => array(
                    'type' => 'submit',
                    'label' => 'Login',
                ),
            ),
                ), $model);
        ?>
    </div>
</div>
<div class="span6">
    <div class="box">
        <h4 class="notice-title">Đăng ký thành viên</h4>
        <div class="notice">
            <div class="cntr">
                <br>
                <h3>ARE YOU NEW USER ?</h3>
                <br>
                <?php echo CHtml::link(UserModule::t("Đăng ký"), Yii::app()->getModule('user')->registrationUrl, array('class' => 'btn btn-success')); ?> 
                <br>
                <br>
                <br>
            </div>
        </div>
    </div>
</div>